package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow;

import com.glsc.ngateway.common.base.domain.mysql.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author xuchang
 */
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Data
@Entity
@SQLDelete(sql = "update t_gw_flow_form_equipment_apply_virtual_device_detail set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@SQLDeleteAll(sql = "update t_gw_flow_form_equipment_apply_virtual_device_detail set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@Where(clause = "deleted = 0")
@Table(name = "t_gw_flow_form_equipment_apply_virtual_device_detail")
@org.hibernate.annotations.Table(appliesTo = "t_gw_flow_form_equipment_apply_virtual_device_detail", comment = "设备申领流程form表单-虚拟机子表")
public class FlowFormEquipmentApplyVirtualDeviceDetail extends BaseEntity {

    private static final long serialVersionUID = -130336294347139793L;

    @Column(name = "equipment_apply_id", columnDefinition = "bigint not null comment '主表ID'")
    private Long equipmentApplyId;

    @Column(name = "business_name", columnDefinition = "varchar(64) comment '业务系统'")
    private String businessName;

    @Column(name = "application_detail", columnDefinition = "varchar(64) comment '应用明细'")
    private String applicationDetail;

    @Column(name = "machine_area", columnDefinition = "int comment '环境'")
    private String machineArea;

    @Column(name = "virtual_name", columnDefinition = "varchar(64) comment '虚拟机名称'")
    private String virtualName;

    @Column(name = "operation_sys", columnDefinition = "int comment '操作系统'")
    private String operationSys;

    @Column(name = "vcent_ip", columnDefinition = "varchar(64) comment 'vcent_ip'")
    private String vcentIp;

    @Column(name = "virtual_ip", columnDefinition = "int comment '虚拟机主机ip'")
    private Integer virtualIp;

    @Column(name = "qj", columnDefinition = "varchar(64) comment '集群'")
    private String qj;

    @Column(name = "cpu", columnDefinition = "int comment 'CPU'")
    private String cpu;

    @Column(name = "memory", columnDefinition = "int comment 'memory'")
    private String memory;

    @Column(name = "user_id", columnDefinition = "varchar(64) comment '责任人'")
    private String userId;

    @Column(name = "bz", columnDefinition = "varchar(64) comment '备注'")
    private String bz;

    @Column(name = "ip1", columnDefinition = "varchar(64) comment 'Ip1'")
    private String ip1;

    @Column(name = "ip2", columnDefinition = "varchar(64) comment 'ip2'")
    private String ip2;

    @Column(name = "ip3", columnDefinition = "varchar(64) comment 'ip3'")
    private String ip3;

    @Column(name = "ip4", columnDefinition = "varchar(64) comment 'ip4'")
    private String ip4;

    @Column(name = "mac1", columnDefinition = "varchar(64) comment 'mac1'")
    private String mac1;

    @Column(name = "mac2", columnDefinition = "varchar(64) comment 'mac2'")
    private String mac2;

    @Column(name = "bf", columnDefinition = "varchar(64) comment '备份情况说明'")
    private String bf;

    @Column(name = "network_segment", columnDefinition = "int comment '网段'")
    private String networkSegment;

    @Column(name = "mark")
    private String mark;
}
